﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using System.Xml.Linq;

namespace Microhard.WeixinMP.Models
{
    public class RequestServiceModel
    {

        public HttpContextBase WeixinContext { set; get; }
        private WeixinBaseData<WeixinEvent> _event;
        private WeixinBaseData<WeixinImage> _image;
        private WeixinBaseData<WeixinLink> _link;
        private WeixinBaseData<WeixinLocation> _location;
        private WeixinBaseData<WeixinTxt> _txt;
        public string MsgType { set; get; }
        public XDocument XDocument { set; get; }
        public string MsgCreateTime { set; get; }
        public string MsgId { set; get; }

        public WeixinBaseData<WeixinEvent> Event
        {
            set
            {
                this.FromUserName = value.FromUserName;
                this.ToUserName = value.ToUserName;
                _event = value;
            }
            get
            {
                return _event;

            }
        }
        public WeixinBaseData<WeixinImage> Image
        {
            set
            {
                this.FromUserName = value.FromUserName;
                this.ToUserName = value.ToUserName;
                _image = value;
            }
            get
            {
                return _image;

            }
        }
        public WeixinBaseData<WeixinLink> Link
        {
            set
            {
                this.FromUserName = value.FromUserName;
                this.ToUserName = value.ToUserName;
                _link = value;
            }
            get
            {
                return _link;

            }
        }
        public WeixinBaseData<WeixinLocation> Location
        {
            set
            {
                this.FromUserName = value.FromUserName;
                this.ToUserName = value.ToUserName;
                _location = value;
            }
            get
            {
                return _location;

            }
        }
        public WeixinBaseData<WeixinTxt> Txt
        {
            set
            {
                this.FromUserName = value.FromUserName;
                this.ToUserName = value.ToUserName;
                _txt = value;
            }
            get
            {
                return _txt;

            }
        }

        public string FromUserName { set; get; }
        public string ToUserName { set; get; }
        public Guid ConversationID { set; get; }
        public WXMPAccountModel WXMPAccountUser { set; get; }
    }
}
